Merge pull request #1 from dsherida/master

converted from c++ to c, updated structures and methods
Merge pull request #2 from dsherida/doug

Merge pull request #1 from dsherida/master