- split apart functions - replace magic numbers with named constants - reorganize functions for better grouping