Removing leading and trailing new lines from snippets.

As discussed #10