Changes made to linear helper functions
Fixed merging conflicts