Moved terminal functions to a different file