Add -g flags to debug compilation.
Fix infinite loop (close gh-7).
Version bump and update documentation.