Added solver; made many other changes