Created connection class and linked the player with the UI