Modified restart handler. Added LDAP testing. Various other changes to make things work.