v.0.2 - Added possibility to select protocol. Some threading logic added