Added messages.
Modified measurement logic.