Moved input handling functions to separate file for when it grows larger to be more organized