Some fixes
Move metadata to separate file