Added some JS layout enhancment