"""Strongly based on code from the stockphoto project (google it?)"""