fixed bugs in lines of variable lenght and implemented more features. It still needs work