some minor optimisations, started tga container