Cleaning up code, recompile performance improvements