use preg_split('/\s+/', instead of explode(" " as more consistent with tabs and spaces. continued fixing of code smells