Renamed <P> id attribute from authoringButton to saveCancelButtons to improve clarity. This id is used by javascript to hide and show the save and cancel buttons.
Moved check for define later to earlier in the call - it was setting "content in use" before checking define later and this would end up with content in use and define later = true