fix issue 4, add tests, move versions into separate methods, add .gitignore, switch from tabs to spaces, general format cleanup