First working version of the refactored code base.