removed deprecated remove_caption_style. simplified else conditional on handling captions.