misc refactoring and experimentation