ref #9 Adding limit for snippet len and other small changes