Cleaned up protocol, added get function to the PHP class.