Moved input logic into module Input
Improved on logic