finished refactoring of surveys - removed about 1000 lines of code