Refine commands and mode lines