Format js, let it looks better.
Support endless mode.