Refactoring "Basic Portal" demo