Starting to implement image mngt

Fixing the code to handle logging, image mngt, etc…
This is the beginning… not working yet!