Removing unused code (just started, a lot still to remove)