Make metadata code independent of mysql. Make sure metadata repositories get properly decorated.

Why is the indexing done on the level of MetaDataService?