refactoring packages and directory structures