refactor and add more descriptive errors
Add descriptive errors and refactor
Merge remote-tracking branch 'origin/master'