cleanup and compile