Refactored code and hid isValid() because it's not applicable for public use.
Fixed wrong condition in ternary operator.
Updated binary and javadocs to reflect previous changes