split type allocation functions and constants into seperate files