Better handling of the two functions.  Background option not fixed.