Added functional routing, get/post request separation, mongodb database writing