code clean up + distributed in files