Refactored as input device rather than character device file
Refactored finally