Bulletproofed dereferencing; fixed a few warnings

Special thanks to: _Must_inspect_result_ .