Rendering attributes now possible, tidied up the code with jscrc and jsHint