Turn into a tsapp, update for modern jquery