Added more checks to takeSolution() and added score checking.