Add metadata.json
Fix unit tests