Move types module to top-level