Removed dead declarations.
Simplified selectors.
Make input button styling available for btn classes too.
Adapted UI elements in preparation for more page types.

Class-based generic views have been used for this, since functionality
will be mostly shared by other types of pages. Small bits might still be
missing, but will be reviewed as part of bug 2866.

Fixes bug 2865.