Init foundation in js, add off canvas preferences pane, clean up exemplary code.