Removal of unnecessary code

simplification in some areas, removal of swathes of commented-out stuff
following branching.