Improve exception handling
Add main statement
Ignore JetBrains project files in git