Added default case for switch, now yields error message when invalid command is provided.