Added basic detection of text lines