Changed command parser to EAFP style