Fixed view test
Added option to wrap compiled js with top-level function