Reworked the design to have a debug rater. Cleanup the code. Should be ready for testing.