Refactor examples and fix broken links