minor changes and eliminate some compiler warnings