Fix display and error checking bugs in newmessage.js and newmessage.css