Fixed some leaks; Tested message system