Matriks data master

cleanup & refactoring