Sidebar controls panel

I fixed the sidebar so that it now can control the panels as well.