Code for the SF application helper