Update gitignore
Update code, javadoc, add usage example.