Fixed sendMessage functionality
Added getHistory functionality