Cleanup6

Inlined some deprecated SessionManager methods, the rest is replacing Raw generics with parametrized ones to make the code type-save & more readable.