#516- Fixed error handling regarding error messages.
#516- Re-factored logic for the order of creating survey and survey pages.