Major refactor at inputbuffer, no more depends on inputwindow or anyother window