Completed class restructuring. Passes all tests, implements part 1 of PA
1 plus all logging.