Added test
added registerFatalErrorShutdownFunction
CS fixes
Comments
Docblock fix return type