refactored and added management scripts