Cleanup compass code to make it compile