Fix ScalaTemplateCompiler warnings

Fix warnings.
Little bit refactor.