Finished coding solver stage, now fixing bugs