Moved some functions to complex headers