Small fixes and simplifications