restructured content div so the exit button persists
fixed some timing issues regarding the rendering of mustache templates