preparation for loading by code

this fixes the codegenerator running with a wrong scene_count <->
quiz_step combination at the end of the scene. it further moves the
application of css classes in a separate function. this may be one step
to restore the whole scene representation when loading by code.

the question is: what else has to be restored?

- concerning dialogue
- and the rest