Refactored types into their own file