Cleaned code, Added web endpoint to configuration, refactored Mongodb class