readme tweaks

Added syntax highlighting to code snippets, made some small formatting changes for consistency.