Added multi-threading
cleanup