Add gitignore
Refactor into separate modules