Further optimized line drawing, removed old line-drawing code