Update extract.go

Added package documentation.