More structural changes

Continued shift towards grouping functions intelligently ass class
methods.