Fixed up ParseCommand, added in comments explaining it