More builtins and refactoring