add .gitignore
refactor for public consumption