DO NOT USE, not tested. Added window support, and need to verify.