Use the types module instead of constructing type objects by hand. Fix #41. Thanks...