More refactoring. Almost back to where it was yesterday ;-)