Refactored olalistener methods into nested lambdas for callback handling
Added event-based thread termination for olalistener