Clean up some of the singleton classes. No need to be as neurotic as we are with them. This also fixes several static analysis warnings.

Signed-off-by: Blake Skinner <bskinner@mit.edu>
Fix the logic here so it makes a bit more sense

Signed-off-by: Blake Skinner <bskinner@mit.edu>
Clean up the error logic a bit and make sure we perform a null check on the error var before assigning to it

Signed-off-by: Blake Skinner <bskinner@mit.edu>