Clean code and fix multi-line message bug