Solver and webpage code