Implemented the window using multi-threading
Many things have changed