Made the RestrictionImpl less coupled
Remembering the restriction for cool tricks
Added tests