Redo from start - moved old code into legacy