Removed callback from the constructor and added an extra onConnected() method