Complete refactoring
Updates gitignore