small code cleanup, fixing some warnings