Some refactoring, added gitignore