Updated index and main