WIP - refactoring profileLocations code