move basic types and functions to their headers