Dealt with compiler warnings and some static analysis hits.