Bug Fixes

Fixed javascript bugs for cross-browser compatibility and separated css
and javascript files.