Completed implementing functionality of submitForm() and caching.