Moved types into separate functions.