started refactor code gen to avoid member lookups.