Updated hub class. Modified main class