Refactored code, added styling to index ppage