Adding sidebar code from default sample project.