Edited code template and added code. Tested with a simple 2x2 matrix test case.

Signed-off-by: deutz