Moved types.h function to own source file.