refactored application layout and home index layout