Cleaned up
Added same functionality (types) to top level variables
Fixed bug with null typename