Add logging

The logging becomes too extensive with this commit.
Remove unused variable and change public string to private
Add inline comment for onConfigureWindow hook method