Further changed the delegate method, and finished implementing the state machine. Also made beaconManager private