Removed lots of legacy code.