Added functionality for text selection which is ultimately unused.