Cleaned up compass bluetooth network code