Fixed naming and error reporting
Improved on documentation