Minor cleanup, extract a method