Changes from smorr@indev.ca.

Fixes issue when looking for object by identifier and the identifier doesn’t exist - it will return a nil now, instead of failing.
Added some convenience methods to get window and windowController.