* Fix memory leaks. * Add comments about initializations and checking for successful results. * Add checks for NULL deref. * Consistency in "TODO" vs "TO-DO" comments!