Changed message system to use shared_ptr
Updated Makefile.