code cleanup, fix remaining warnings