cleaned up arg parsing and general main method