Refactor for dave's sexy changes