Refactoring, work in progress
In progress.