Lots of changes.
Refactoring.