Changed the database name to goals, added global variables for db and collection names.