Added equals & hashcode, extended tests to 100%

Also made final and simplified some logic, arguably. ;)