HillClimbing refactored to use a given Constructor