Backend changes, optimize script enqueueing