Added option to limit connect attempts and option to stay connected
Refactored code for bluetooth connection and data dispatch