Refactored css-cascade

A bit slower but this is the price to pay for genericity...