refactor Screen and input