detail:cleaning code & refactoring.