Changes to allow attaching the terminal to other elements apart from body