cleaned up app/index file to be more optimized