Refactored greeter and index