Limit mex width of window + refactoring custo message window