Refactors and cleans the survey views & api