commented code and changed function name in layout.js