improved readability when survey title set (div), cleaned up and fixed and added tests for computeaverage