Refactored MetadataServiceHelper. Removed spanning related functionalities.
Merged with latest code.