Partial refactoring of builtins into standard library. Minor cleanup of static environments