Cleaned the UI, and optimized the bluetooth code