Minor cleanup
Fix inconsistencies
Extract rule definitions, minor cleanups