main file is now 200 lines smaller , commandline parsing has been seperated