Add Submit function with testing

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