Cleaning a little the code.

- Adding some spaces and comments
- Use the new PHP __DIR__ magic constant to get current directory
- Spaces -> tabulations
- Refactored a very little the loops, to avoid PHP notices if some info isn't found