Eliminate some compiler warnings and errors