Refactors input submission method
Fixes merge conflict