Move common code in GTK & NCurses in Core
Remove unused variables in NCurses functions
Add refresh support in NCurses mode
Fix mistake in CMakeLists.txt