fixed memory leak in makeTrueImage, cleaned up code