Added bluetooth functionality, cleanup