cleaned up js code for page transitions, also cleaned up the css a little.