Added builtin types, functions and a few fixes.

Thanks for the files. Just a few fixes and the main built-in types and functions, based on the current documentation.