Add pre session_start() check
Remove unused code