Patched rest of code, button input is still finnicky