Refactor a tad.