major rearrangement and first version of imagecollector demo