Split cli code into seperate files