Removed commented-out code [ci skip]
Rearanged code
Moved key checking to parse_cmd_args method
Fixed prereqs
Auto-add line number to command errors