Dreams controller refactoring