cwin leaks memory. will begin a rewrite to fix.