Moved bluetooth code into its own file