Merge pull request #126 from Gautham/master

Fix Redirect Loop when there is no index.md
Refactor Code. Everything Works
Merge pull request #129 from Gautham/Dev

Refactor Code.