- variable handling

Signed-off-by: Siddhartha Gupta <makerzzz.zzzz@gmail.com>
- removed die and using template layers

Signed-off-by: Siddhartha Gupta <makerzzz.zzzz@gmail.com>