Simplify and fixes.