nicen styles a bit, get rid of extra markup, add error checking