Cleaned up code, and renamed command arguments to something sensable