Fixed some bugs
Added genetic algorithm implementation