refactoring to move the sidebar container div into sidebar.php

and add a couple more hooks