Bug and performance fixes

The program as a whole still suffers from poor solution representation