Added cmd line image provider, some refactoring was applied