upgrades to allow handling of contracts within the webapp