added css class/id handling to main script and entry class. fixed the backgrounds template