moved command line interface related things into own class, reduced main to minimum