WIP: Compiler and Selector

Initial version of a compiler.
This will be called over and over in the compiler. This needs to be fast even on mobile. Closure are relatively expensive and so is foreach. Given that this will be hot code we should rewrite it with minimal of any closures.