Started adding material to imagecube/tests

Also a few minor changes to main imagecube (functionality shoudl be unchanged).