Refactor examples

and add a more complete examples with freeze and setup.py (not finished yet)