Fix and simplifications