Added resolution change listener for system properties.
More refactoring and cleanup.