Better logic for compass_compile function.
Final, hopefully, compile_compass function