Change dimensions protocol into struct winsize and removed useless instructions