add .gitignore, refactor into init and routes