Refactored packages.
Use case classes, cleaned up code.