Eliminate warnings and general cleanup.