added source to .gitignore.
minor refactoring.