added get type of expr command and some minor fixes