Major refactoring in package structure