Cristian: optimized js library2