Added logging support, PHP standard fixes. More in CHANGELOG