Restructure: Refactor manage script.