Remove double definition of function