Several changes and fixes.