Some gfx fixes and tests

All the tests have been validated on a real Nokia Asha 503