Changes for allowing Sugar and its components to be customized/overridden.