Moved snippets reading logic