Fixed fitness double/int bug.
Optimized code.