Added the possibility to specify a caption class