Added full specs tests and fixed a few uncovered bugs.
Added test of warnings when switching metadata version