Refactor, tweak some rules