remove unused code within #ifdef OLD_GRAPHICS blocks