Dynamic injection of css classes.

Dynamic injection of css classes and some other minor changes.