major changes in space_evenly; added get_algorithm; parametrized connect_lines;