Improved background generation