Removes reference to gfx from flash module
Cleans up misc declares in ts