Cleanup. Made some fields private. Made so that just SendError needs to be called for this to work.