improve JavaScript compiler + add JS timer in lib