Update the README with better markdown formatting and tidy up snippets