Improve script preprocessing

Now comment processing does not use regex.
Building script chunk became faster.