refactor background images; fixes #504; fixes #503