Some simplification on the code provided by the template.