Move coverage computation to the right place