Moved line translation to its own class