Move input stuff to its own file