Add implementation of type system