cleaning up application layout JS