include PHP Wrapper and other bug fixes