Implemented equality in a somewhat sane way, tests crash for no apparent reason
Minor cleanup, tests run now with small modification of testing library