Some modifications and fixes.