Remove terminal class, correct index issues with TerminalTypeTask, begin latch implementation