Added .gitignore
Cleaned up exception handling