Add php Ping class and refactorying all shit