Refactoring some old code and first working version of the command line collection creator