Selection features

Updated ExpandToLine, JoinLines, and InvertSelection based on feedback.