Update index.php

added the sort function and adding classes to list