refactoring and first steps for dry stand