Fixed issue where pngs and gifs werent being uploaded. Made some minor syntax changes.