Added Split Script

Fixed some bugs and added Split Script.