Reducing size of JS