Minor code improvements
Added support for metadata.json