Refactor examples. Draft api.