Fixing bugs and setting up the Input