Almost done with submissions

Added submission tables and fixed the ajax php handler for posting a
submission. Fixed jQuery responses as well.