Package structure refactoring.

Restructured the package naming and renamed some classes.