[refactoring] Error handling and memory improvements
 - Extracts the work with shared memory
 - Removes the dependency on UniversalErrorCatcher, adds own dummy catcher to handle the fatal errors
Merge pull request #3 from vatson/refactoring

[refactoring] Error handling and memory improvements