More refactoring - STILL ERRORS