Update code and sample project