Fixed bug in deduction-taking code

Deductions equal to the point value of a required function or module
are now taken correctly.
Un-commented code
Added JSON parsing failure check