Removed compass code from functions file