Improved the background-drawing process.