Better handling of builtins, minor refactorings.