Transform Terminal into abstract class
Prepare to extract common code