Fixed bugs in go-code. c-code does not run and is thus commented out