Make errors in functions more consistent

THIS IS AN INCOMPATIBLE CHANGE
Merge pull request #98 from LinuxJedi/error_functions

Make errors in functions more consistent