Added new mode buttons, implemented line mode