Updates to chain code