ENH: removed space after opening \f$ and before closing \f$, Added virtual to some functions declarations.