Major Overhaul

This version has passed all of my tests.