refactor package structure and add .cache to .gitignore