Misc ZK related code