More corrections, still more needed:
Need to move the session related stuff back to dba.