compress metadata message
merge data (fix #519)
some cleanup