Implement bunch of builtins and refactor interpreter code