cleanup security and add settings