Fixed assignment and submission javascripts because window.onload was being glitchy