compile working properly again; some cleanups