Fixed includes, added entity expiration