code clean and fixes documentation