Added Type class and refactored other classes to use it.