Switched to the new Type class
Added type error classes to new type.hpp
TypeFactory fixes and cleanup