cleaning JS blocks