Prelim upload

Finished files but some tweeking needed in buffer.c. Still matches test
files.