First attempt at generalization

Removed some hard-coded paths. Hard-coded buffer size now stored as a
variable. Minor documentation corrections.