Removed unused code.
Moved code into getResourceObject().
Fixed third window.