Update v1
- First attempt in simplifying the code
- Make some cosmetic changes (echo)
- Add comments and use a few linebreaks for better overview