index now renders

Fixing 3 or 4 bugs which prevented the page rendering.