Storing selected layers in client side session.
Refactored layer Session storage code.