Integrated the thread start/stop callbacks with attach/detach. Beautiul.