Made changes Blake suggested; simplified the logic of type identifying functions; made the code in calculate_angle_from_vertices self documenting