Minor cleanup and code refactoring.
Adding gitignore