Make javascript a bit consistent across scripts