Improve error handling
Tweak notation
Tweak naming
Remove unused code