Updated chapter-9 components sample code.