Major refactoring / restructuring.