Tail call optimization for search iteration

Fixes #256
Prepare 0.4.1
Merge branch 'develop'