Working on refactoring SSPI into something more sensible