For #925, Pull markup out of Contexts methods

Pulled the markup out of the methods in the Contexts class to
(hopefully) make it a little easier to replace the markup according to
the desired framework. Likely still needs some work, since the templates
are still built around the structure of Bootstrap 2.