Added queue and some basic multi-threading