more tweaks to gfx engine, mostly from tuturial