Comments.
Removed hardcoding of active.
Completely updated to use sessionStorage instead of cookies, plus added remove and removeAll.