Adopted Jeff/Afshin Makefile. Changed structs. Removed WriteBuffer wrapper.