Added better docs and fixed some snippets