Refactored addMsg() completely; not tested/debugged yet, tho