fix memory leak;
add example;
rename examples.