Improved background handling.
Added option for resizing.