Kill some code duplication in the terminal