changed order of definitions, rename removeMedia to removeButton