Resolve id conflict, add custom template option, add class to image, fix margin