Refactor for more flexible locations.