Added deallocation method
reworked message buffer handling