bumped version, improved error handling and minor refactorings