Added sample project and fixed bugs