Modified region monitoring code to detect multiple beacons at once, and refactored/cleaned up