restructures page layout and script directory