Fix compile and test errors

Fix cross compile against scala 2.9.

On my machine I get a test failure when the 'real' template is compiled in multiple tests (probably just the right level of parallelism to cause this). Have made them separate templates.