Added end-touch functions. Properly splitting lines in app.