Cleanup
Added C implementation.