Refactoring and separate dot writer
Refactoring,separate goimport