Update equals and hashcode
Fixed some Checkstyle errors. Closes #3.