Added C implementation files

If you find any bugs, let me know