replaced pool threads by scala ones (still to improve and parameter from conf), plus some fixes