Added db stuff and made index page less ugly.