Refactor zk explorer code.