Crappy scratch, with bugs and not well-designed multi-threading