renamed IsStraight
split off data structures
did some more refactoring