Fixes for #317, #339, #365.
Add css class
Merge pull request #379 from cpoulain/master

Merge fixes for #317, #339, #365 from willum070