add yaml dep
header parser refactor and spec, trim whitespace before parse