Splitting the code into multiple files

- Splitting it into hub, conn and the main file

Reviewed by:
Testing:
Tickets:
Backport: