lots more cleanup and work on sidebar