Simplifications and fixes.