Added more window api methods, added signal watchers and cleanup of connection/subprocess

windows debugging 1

windows debugging 2

windows debugging 3

windows debugging 4

windows debugging 5

windows debugging 6

windows debugging 7

windows debugging 8

windows debugging 9

windows debugging 10

windows debugging 11

Cleanup and finalizing