Remove duplication as per CodeClimate recommendation