css class based on type, fix tests