Refactor structure for examples and extensions