Changed constructor using fields of ServiceThread