Miscellaneous JavaScript I keep relying on