Added some naff c bindings to speed me up a little