Removed unneeded code, better argument parsing