more reorganizing, added session controller