Some classes have been added to clean up the code.