Fixes, tweaking and logical changes