[FIX] major rewriting of the base code, spliting data and metadata