Add org & dept settings validation.
Cleanup some code alignment.
Sanitize and validate the image settings.

Closes gh-18