Use hosted resources; counting x not necessary. Other small changes.