Added template entities and minor changes

Change-Id: I94e46c3867fbd6a8de0233f7e7a251ee4b1f32ff