Updated with new sample project and extracted classes