Docs and tests.
Try to avoid capturing SQLContext.
Drop toString
Switch logging so that SQLContext can be serializable.