Add documentation, implement removeDevice() method and add some missing mutexes.