Code cleanup, eliminating some warnings