greatly improved image stuff; simplified the way image scaling is done