Add mode lines
Delete unused functions and definitions