refactorings; improvements; clean up