Updated readme and fixed a snippet