add sqlite3 and .log to .gitignore
Refactoring specs and code