Fixed the build errors and added a sample project