Fix: delete event on normal window
Split entire thing into multiple modules + some cleanup