optimize loader
add tests for schema yaml parsing