Marcin: #SMALLSTEPS mongo repository out into its own file

Plus using the anyonymous function pattern that James Shore uses in his examples. Hope it's sensible
Marcin: This is all rather async so we'll be more truthful.
Marcin: Server should only deal with WEB server functions, core app should be small
Marcin: Now main application is cleaner
Marcin: This shutting down doesn't really work so taking it out for now.