Refactorin: general consistency tweaks