Refactored the library to take pointer to a fitness function instead of first generation.