Added business logic code so that it seems to work now.  But I only tested it for a few minutes.  Might be some edge cases I missed.