Lots of tips here - refactoring basics, identifying classic patterns in spaghetti code and how to move forward.