Fixed major bug where multiple instances were being added to each location and added another utility function