First version with working line recognition.