Refactor location