move code snippets to separate files
describe rationale in README