Added builtin types, functions and a few fixes.