Adding melding and better inline templating

Change-Id: Ic6f2d71b7897fc218ddf25ca33cb5587beb2f4f0