Code segregation and Activity indicator added while submit is in progress.