split examples.py + cleanup interface