Initial import.
Merge pull request #19 from olesku/master

Initial import of C implementation.