Implement equals (fixes #59)
Documentation and cleanup