restructured tests
If there is no compileRule for len then use 0.

Fix for issue #1
Fixing tests as well as take care of undefined templates.