Refactor JS

- Better testing for session storage support
- Use a chainable function for showing bars
- Move all functions/initilization outside of DOM rdy