Refactor package structure