Add close elements through code

Change-Id: I517221ebcc062477f315c6716e74056c754988a0
Merge "Add close elements through code"