Fixed issue with timeouts and intervals.
Added the ability for a close trigger and some additional debugging messages.