Fixed issues with having embedded forms

OHHHH I FIXED IT. Didn't close the form tag for the top form, and didn't
have an id for the top form which meant that the bottom reference to the
id 'main' didn't work. It should all work now