Add Submit function with testing

I added a Submit function following your conventions as best I could. I also added a testing file.