Split functions into modules. Check MongoDB if entry exists