Fixed split_str implementation ; minor improvements