Sidebar Fixes

Having some problems with sidebar, so I rebuilt it from scratch.
Hopefully this will now enable it to work across browsers, as
preivously it would load in my OSX chrome browser but not on any
windows browser.