Fix type compatibility/prototyping bugs.
Merge pull request #28 from davelxmos/13fixes

Fix type compatibility/prototyping bugs.