more cleanups, make it work with config through simpleSAMLphp