Separate templates from source code.
Minor code fix