cleanup up the listener class to be more of a self-contained object for each instance (platform), added some more cleanup operations
debug
debug
fixed platform variable clobber
debug