Made split code use lsplit and rsplit for better behaviour