Fixed type errors in Input and Token modules