Moved to object-oriented modules for greater reusability.