added Window Handler and added release resource from rerources manager