Updated contracts code