refactored to use service for locations and async thread for rabbitmq
communication.
- added preferences