Finally fixed the bug with long lines being incorrectly rendered
Finally fixed the bug with long lines being incorrectly rendered and also removed some obsolete stuff