Refactors Message model and adds specs.