refactor, split interfaces and simplify, more examples and tests