connection: Move enums out of session