Added code in vignette.
Fixed some ranges issue in methods
Added some doc.