Merged the changes from the leafSupply project