Tweaks and Fixes

Tweaks and code fixes