Removed duplicated code, added SessionHelper.