Move JS hackery to own include file. Thinking about the future.