change tidy up code and remove unused logs