fixed some issues and move example to own directory