Refactor the code a little to allow for repeated uses of the XBlock on a page without too much duplication of assets