Tweaks and Refactoring