Remove some logic from template