Remove unneeded end and pass context to invoked template; fixes #15.