JS hackery and other nonsense