Clean up code + Compile for 1.7