Big refactoring: remove all compat code, createXxx functions; use only constructors; remove gfx/gfx module, only use class modules; various cleanups.