Simplify cruft around generating note and flag css classes in non-ui js/markup