Might be nice to remove debug code.