volume fixes and refactoring