Even more cleanup and removal of legacy code