Added DB actions after submit. Need to test on the actual environment.