Very minor changes in code and a few new rules

Very minor changes in code (no altered behaviour) and a few new rules