Updated DOM manipulation

Fixed pull 5 so it uses our css (document.write writes a "new page" and
thus ignores css. Added simple grid styling to external css. Moved the
build function to the external js - we gain an HTTP request but also
gain a reusable function for when we need to build a grid later.
Revert "Updated DOM manipulation"

This reverts commit 04f0ddb19cf0e066dc1b624db306486993d7a45a.