Fixed warning message about *contrib-dir*
Rewrote module functions to be entirely recursive and implementation independent