Refactor part of ModestWindow and ModestHildon2Window