Trying to refactor resize.