New builtin `Input` function, and tried to clean up the code a litte