Speed up working with JS