Added the package waterline in order to abstract the database.

Added average function on ResponsesController.