Tweaking and bug fixes.