Added metadata support
fix test case
Merge branch 'sudo-metadata' into dev