Fix SimpleClans error. Performance increasement. other code optimations