Implemented first version of line splitting.