light template: Retain cycle fix; Dismiss method template; Code style fixes;