removed old type check functions from MyParser and reformatted MyParser