Misc changes.
Add mongodb storage script.