More tests, bug fixes

Fixed bug where questions would not preview correctly.
Fixed bug where tables would not render correctly on firefox when there
was a global variables form.
Fixed bug where downloading would fail.