Fixes leaks.
add more sample code
Revise interfaces, remove unused initializer.