Cleans up simple warnings.
Fixes ArrayIndexOutOfBoundsException.
Adds example project.