Changed genetic algorithm from static class to instance class