Use closure to compile JS instead