Fixes, error handling, improvements.