cleanups and compile