cleaned up code samples in the docs