Added some debug
Test compile works
Single test fails
Refactoring of metadata