Fix type tagging and put back type/var classification