HOPKINS: Cleaned up the addDirtyRect method