Move types to their own module.
Update dependencies.