The sensible thing, of course, would be to run Linux, so in the event of another amazing display of incompetence like that (which is probably already in the pipeline), they could support an older version in-house for a tiny, tiny fraction of that cost.
This is the Federal Government we're talking about. Not only is "sensible" a negative thing, but the costs of internal maintenance of any IT project would most likely be multiples of just paying someone else for a proprietary solution. Consider the IRS is "only" paying $12 million for a year's support for its computers; doing that in-house would undoubtedly cost 4-5 times that amount and result in slower service as all requests need to be filed in triplicate with 3 different agencies, and cross-referenced with non-sequential numbers...
I've noticed several design suggestions in your code.