Alter layout to async request javascript, to improve performance