Added javascript and restructured css