Getting closer to all functions stubbed out.
Restructuring and refactoring.