Clean up a few more bugs and unnecessary error checks