Fixed some bugs. More testing for windows and garbage collection. Submitted bug for Lua crashing when dialog destroyed.