Fixed the splitting function.  Also works from command line with sys args or IDE.