Convert to .scala. DRY up Scala version, unify 2.9 and 2.10 templates.