Merged with andreas changes, fixed up some stuff. Made persistent header/sidebar