Major refactoring. The code is now much more OO.