remove collect operation, fix remaining warnings