cleanup formatting

add: 'before' and 'after' params to allow custom appearance
change: remove 'span' style; allow the user to colour the widget using 'b' and 'a' attributes
change: cleanup foramtting code, putting attributes on new lines to make it slightly more readable