refactor: change the way the SA session is used

Change the SA session so it is explicitly opened and closed where
it is required instead of keeping a pool of them.