Cleanup code. Added gradle wrapper.
Fixed NullPointerException.
Cleanup res files.
Added doc strings.