Cleaned the mongo storage code