Merge branches 'new-upstream', 'cpphs' and 'curses' into dev