Added auto-indexing

- Indexes source files automatically if no index file was found.
- Added comments to make it more readable.
- Moved the max episodes setting to the top in order to improve
usability.