Refactored window morph.