Add pause button and move ajax protections into scripts