Activation view: generate decent code

Removed broken html (missing opening tbody and closing table), decent code folding.