implemented messaging along with other small bug fixes