Refactored dbmanage
Getting warehouse installation working.