Swapped out static data for connection to Mongodb and added basic sub & pub