simplify and fix entityMetadata parsing and serializing
better test coverage
Release 0.6.0