Device handler and IN added
Terminal partly implemented