Add comments
Improve error feedback