improve JS compilation