Added initialization code in BuildLayout()