Added  a lot of session.close(), some untestet

Signed-off-by: Sven Haardiek <Sven@Haardiek.de>