Add elementary functions, more defines, and types