Major refactoring of the code base.