code clean up

- fix index.php coding style
- refactor, clean up slide.js