Completed port to Mongo. WOrks fine now. Fixed some bugs in Image and TestInternal.