added extension and ability to get default image. Still some hardcoded stuff.