clean up index route code.

remove logs + fix indentation