working sessions, needs tests improves and cleanup