Added a smarter line drawing routine even for test curves (which look cool)