Modified multiple session definition, re-organized some elements.