Refactored startOfLine() and endOfLine() methods a little, updated example