Revert "Revert "Refactor StagingsController""

This reverts commit bbe4fc74b45d9dd623e3e917cebbbad7aa674557.
Fixed the flakey test.