Moved some logic to template