refactor and update gitignore