added gitignore
More tests and refactoring