Clean screen, handle input chars, write input