Added error handling to solver and ensured all required methods are in Node.