Moved c-code from /lib dir