Further work is needed after #2455 is merged to rename classes more appropriately and clean up the code.