Added MessageEntity. Added EventManager. Clean-up.