Remove unnecessary C code and use everything from Golang