Refactoring to make PlateTectonics package more reusable.