Refactor countrydetail

Avoid logic in templates
Use 'reset' when resetting a state