Added caching (with mongodb) to speed up coc responses. Still a lot of hardcoded and messy code though...