more complete git ignore
refactoring and fixing tests