Updated main.

Fixed split function.