refactored home and index