First version

Main bug is inability to cease main for loop in function solver.