Removing trailing whitespace in model template