Added strictness logic, allow fewer elements than headers if not strict, reimplemented strict tests.