Pluggable data sources for Metis. Fix #336.