Expand logic for leaf rules
add Templates for Tests