Small comments & refactor + error handling (2)