speed up access to module globals
factor out builtin access code
fix name lookup in class scope