Added split function and some other stuff.