Refaactoring,  cleanup