Refactor manifest creation and management