Removed duplicate function for getting variable type and function return type.
Moved functions around.
Change token type to be an enum.