Massive Refactoring

Refactored so that all logic is in the Yam static class. This, seems to
me, allows a more fluent interface.