Fixed config, merged cleanup into one method