Rewriting the whole thing in Go