Add JS message class

This adds messages next to elements. Currently work in progress, will be
moved to script.js in due time.