Remove unused references and cleanup in main.
Add class to handle Bluetooth connection