Began refactoring of all old code.