Sorted split method to split on regex /\./
Also changed size to length on array.