Optimizing the code to reduce the program file size by: 1. Removing redundant functions and reducing function nesting 2. Merging library files and moving some static function code into library files