module.exports = {
  exec: function (javaScriptString) {
    var returnString = ''
    function css (cssString) {
      returnString += cssString
    }
    try {
      eval(javaScriptString)
    } catch (e) {
      console.log('Exception in your jcss')
      console.log(javaScriptString)
      console.log(e)
      return false
    }
    return returnString
  },

  cssRegex: /^[\s\t]*([^\n\(\)]+\,\n)*([^\n\(\)]+)?\{[^\}]*\}\n*/gm,

  split: function (jcssString) {
    var currElem
    var returnArr = []
    var cssString = jcssString.match(this.cssRegex)
    if(jcssString.length < 1) return false
    if(!cssString) return [['js', jcssString], ['css', '']]
    if(cssString == jcssString) return [['css', jcssString], ['js', '']]
    var jcssSplit = jcssString.split(cssString[0]).reverse()
    while((currElem = jcssSplit.pop()) != undefined) {
      currElem.length > 0 ? returnArr.push(['js', currElem]) : returnArr.push(['css', cssString[0]])
    }
    return returnArr
  },

  interpret: function (someArr) {
    return (someArr[0] == 'js' ? this.exec(someArr[1]) : someArr[1])
  },

  parse: function (jcssString) {
    var splitJcss = []
    var bufferArr = []
    var parsedCss = ''
    if(jcssString === false) return false
    while(splitJcss = this.split(jcssString)) {
      parsedCss += (bufferArr[0] = this.interpret(splitJcss[0]))
      parsedCss += (bufferArr[1] = this.interpret(splitJcss[1]))
      if(bufferArr[0] === false || bufferArr[1] === false) return false
      jcssString = jcssString.substring(splitJcss[0][1].length + splitJcss[1][1].length)
    }
    return parsedCss
  }
}

@@ -360,24 +360,63 @@
   %7D,%0A%0A  
+split: function (jcssString) %7B%0A    var 
 cssRegex
 : /%5E%5B%5Cs%5C
@@ -407,17 +407,18 @@
 cssRegex
-:
+ =
  /%5E%5B%5Cs%5Ct
@@ -469,134 +469,116 @@
 */gm
-,%0A
 %0A  
-split: function (jcssString) %7B%0A    var currElem%0A    var returnArr = %5B%5D%0A    var cssString
+  var cssRegexRes, returnLang%0A    if(!jcssString) return false%0A    cssRegexRes
  = 
-j
 css
-String.match(this.cssRegex
+Regex.exec(jcssString
 )%0A  
@@ -586,420 +586,588 @@
  if(
-jcssString.length %3C 1) return false%0A    if(!cssString) return %5B%5B'js', jcssString%5D, %5B'css', ''%5D%5D%0A    if(cssString == jcssString) return %5B%5B'css', jcssS
+!cssRegexRes) return %5B'js', jcssString, false%5D%0A    returnLang = jcssString.indexOf(cssRegexRes%5B0%5D == 0) ? 'css' : 'js'%0A    return %5BreturnLang%5D.concat(this.splitAroundSubstring(cssRegexRes%5B0%5D, jcssString))%0A  %7D,%0A%0A  splitAroundSubstring: function (subs
 tring
-%5D
 , 
-%5B'js', ''%5D%5D%0A    var jcssSplit = jcssString.split(cssString%5B0%5D).reverse()%0A    while((currElem = jcssSplit.pop()) != undefined) %7B%0A      currElem.length %3E 0 ? returnArr.push(%5B'js', currElem%5D) : returnArr.push(%5B'css', cssString%5B0%5D%5D)%0A    %7D
+string) %7B%0A    var substringFirst = string.indexOf(substring)%0A    var substringLast = substringFirst + substring.length%0A    if(substringFirst === 0) %7B%0A      return %5Bstring.substr(0, substringLast), string.substr(substringLast)%5D%0A    %7D else %7B
 %0A    
+  
 return 
-returnArr
+%5Bstring.substr(0, substringFirst), string.substr(substringFirst)%5D%0A    %7D
 %0A  %7D
@@ -1352,16 +1352,13 @@
 ffer
-Arr
  = 
-%5B%5D
+''
 %0A   
@@ -1384,16 +1384,23 @@
 %0A    if(
+typeof 
 jcssStri
@@ -1402,25 +1402,27 @@
 sString 
-=== false
+!= 'string'
 ) return
@@ -1436,14 +1436,19 @@
     
-while(
+do %7B%0A      
 spli
@@ -1477,19 +1477,16 @@
 sString)
-) %7B
 %0A      p
@@ -1504,22 +1504,16 @@
  (buffer
-Arr%5B0%5D
  = this.
@@ -1535,126 +1535,26 @@
 Jcss
-%5B0%5D))%0A      parsedCss += (bufferArr%5B1%5D = this.interpret(splitJcss%5B1%5D))%0A      if(bufferArr%5B0%5D === false %7C%7C bufferArr%5B1%5D
+))%0A      if(buffer
  ===
@@ -1578,18 +1578,25 @@
 lse%0A    
-  
+%7D while (
 jcssStri
@@ -1604,83 +1604,21 @@
 g = 
-jcssString.substring(splitJcss%5B0%5D%5B1%5D.length + splitJcss%5B1%5D%5B1%5D.length)%0A    %7D
+splitJcss%5B2%5D)
 %0A   

Rewrite split and pass most of the tests