Refactoring classes to appropriate packages.