Revision 9 -- Some minor code refactoring.