getFolderContent and getStats outsources into new file to keep route.js clean.