add hashcode/equals
add tests, cleanup controller