Extensive changes to fit sidebands: clearing up old cruft, streamlining code to work with Tijs' trees